import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { StoreModule } from '@ngrx/store';
import { reducers, metaReducers } from './store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { environment } from '../environments/environment';
import { NgZorroAntdMobileModule } from 'ng-zorro-antd-mobile';
import { AppComponent } from "./app.component"
import {RxjsComponent} from "./rxjs/rxjs.component";
import {HomeComponent} from "./home/home.component";
import {ErrorComponent} from "./error/error.component";
import {RouterComponent} from "./router/router.component";
import {Page1Component} from "./router/page1/page1.component";
import {Page2Component} from "./router/page2/page2.component";
import {LazyComponent } from './lazy/lazy.component';
import { BasicComponent } from './basic/basic.component';
import { FormsModule } from '@angular/forms';
import { DirectiveComponent } from './directive/directive.component';
import { HoverDirective } from './directives/hover.directive';
import { SummaryPipe } from './pipes/summary.pipe';
import { PageAComponent } from './page-a/page-a.component';
import { PageBComponent } from './page-b/page-b.component';
import {ServicesModule} from "./service/service.module";
import { NgRxComponent } from './ng-rx/ng-rx.component';
import { EffectsModule } from '@ngrx/effects';
import { CounterEffects } from './store/effects/counter.effects';
import { MyrxjsComponent } from './myrxjs/myrxjs.component';
@NgModule({
  declarations: [
    AppComponent,
    RxjsComponent,
    HomeComponent,
    ErrorComponent,
    RouterComponent,
    Page1Component,
    Page2Component,
    LazyComponent,
    BasicComponent,
    DirectiveComponent,
    HoverDirective,
    SummaryPipe,
    PageAComponent,
    PageBComponent,
    NgRxComponent,
    MyrxjsComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgZorroAntdMobileModule,
    FormsModule,
    ServicesModule,
    StoreModule.forRoot(reducers, { metaReducers }),
    !environment.production ? StoreDevtoolsModule.instrument() : [],
    EffectsModule.forRoot([CounterEffects])
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
